package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.GasThresholdSettingsMapper;
import com.ruoyi.business.domain.GasThresholdSettings;
import com.ruoyi.business.service.IGasThresholdSettingsService;

/**
 * 气体阀值设定Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-07
 */
@Service
public class GasThresholdSettingsServiceImpl implements IGasThresholdSettingsService 
{
    @Autowired
    private GasThresholdSettingsMapper gasThresholdSettingsMapper;

    /**
     * 查询气体阀值设定
     * 
     * @param id 气体阀值设定主键
     * @return 气体阀值设定
     */
    @Override
    public GasThresholdSettings selectGasThresholdSettingsById(Long id)
    {
        return gasThresholdSettingsMapper.selectGasThresholdSettingsById(id);
    }

    /**
     * 查询气体阀值设定列表
     * 
     * @param gasThresholdSettings 气体阀值设定
     * @return 气体阀值设定
     */
    @Override
    public List<GasThresholdSettings> selectGasThresholdSettingsList(GasThresholdSettings gasThresholdSettings)
    {
        return gasThresholdSettingsMapper.selectGasThresholdSettingsList(gasThresholdSettings);
    }

    /**
     * 新增气体阀值设定
     * 
     * @param gasThresholdSettings 气体阀值设定
     * @return 结果
     */
    @Override
    public int insertGasThresholdSettings(GasThresholdSettings gasThresholdSettings)
    {
        gasThresholdSettings.setCreateTime(DateUtils.getNowDate());
        return gasThresholdSettingsMapper.insertGasThresholdSettings(gasThresholdSettings);
    }

    /**
     * 修改气体阀值设定
     * 
     * @param gasThresholdSettings 气体阀值设定
     * @return 结果
     */
    @Override
    public int updateGasThresholdSettings(GasThresholdSettings gasThresholdSettings)
    {
        gasThresholdSettings.setUpdateTime(DateUtils.getNowDate());
        return gasThresholdSettingsMapper.updateGasThresholdSettings(gasThresholdSettings);
    }

    /**
     * 批量删除气体阀值设定
     * 
     * @param ids 需要删除的气体阀值设定主键
     * @return 结果
     */
    @Override
    public int deleteGasThresholdSettingsByIds(Long[] ids)
    {
        return gasThresholdSettingsMapper.deleteGasThresholdSettingsByIds(ids);
    }

    /**
     * 删除气体阀值设定信息
     * 
     * @param id 气体阀值设定主键
     * @return 结果
     */
    @Override
    public int deleteGasThresholdSettingsById(Long id)
    {
        return gasThresholdSettingsMapper.deleteGasThresholdSettingsById(id);
    }
}
